update

FFIB 8 hours ago
parent
commit
8f7e780697
1 changed files with 12 additions and 12 deletions
  1. 12 12
      member/activity_admin_views.py

+ 12 - 12
member/activity_admin_views.py

@@ -14,7 +14,7 @@ from member.models import MemberActivityContributionInfo, MemberActivityInfo, Me
14 14
 from account.models import UserInfo
15 15
 from utils.error.errno_utils import MemberActivityStatusCode
16 16
 
17
-from pre.custom_message import sendtemplatemessage
17
+from pre.custom_message import sendwxasubscribemessage
18 18
 
19 19
 WECHAT = settings.WECHAT
20 20
 
@@ -295,14 +295,14 @@ def handle_student_signup_passed(activity_id, info):
295 295
     wxcfg = WECHAT.get('MINIAPP', {})
296 296
     appid = wxcfg.get('appID')
297 297
     user = UserInfo.objects.get(user_id=info.user_id)
298
-    sendtemplatemessage(openid=user.openid, template_id=settings.TEMPLATE_ID_ACTIVITY_STUDENT, data={
299
-        "thing2": {
300
-            "value": act.title
301
-        },
302
-        "phrase1": {
303
-            "value": u"审核通过"
304
-        },
305
-        "thing5": {
306
-            "value": u"点击领取学生专属购镜优惠券"
307
-        }
308
-    }, miniappid=appid, minipagepath='/pages/member/activity/activity?signup_id={}'.format(info.signup_id))
298
+    res = sendwxasubscribemessage(openid=user.openid_miniapp, template_id=settings.TEMPLATE_ID_ACTIVITY_STUDENT, data={
299
+            "thing2": {
300
+                "value": act.title
301
+            },
302
+            "phrase1": {
303
+                "value": u"审核通过"
304
+            },
305
+            "thing5": {
306
+                "value": u"点击领取学生专属购镜优惠券"
307
+            }
308
+        }, miniprogram_state=None, lang=None, page='/pages/member/activity/activity?signup_id={}'.format(info.signup_id))